import { initState } from "./state";
import {
  addMouseDownEvent,
  addMouseMoveEvent,
  addMouseUpEvent,
  removeEvent
} from './event';
import { ctx } from "../../scenes";
export function initMixin(Entity) {
  Entity.prototype._init = function () {
    this.$entity && this.$entity.setCtx(ctx);
    const instance = this;
    initState(instance);
    addMouseDownEvent(instance);
    addMouseMoveEvent(instance);
    addMouseUpEvent(instance);
    removeEvent(instance);
  }
}